﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ExampleWebApplication.Models;
using CrossLayerCommunication;

namespace ExampleWebApplication.DAL
{
    public class Storage
    {
        public IOperationResult<IEnumerable<Task>> GetTasks()
        {
            return new OperationResult<IEnumerable<Task>>(new Task[]
            {
                new Task(new TimeSpan(9, 0, 0), new TimeSpan(9, 45, 0), "Arrive at work"),
                new Task(new TimeSpan(9, 45, 0), new TimeSpan(11, 0, 0), "Coffee break"),
                new Task(new TimeSpan(11, 0, 0), new TimeSpan(11, 15, 0), "Check e-mail"),
                new Task(new TimeSpan(11, 15, 0), new TimeSpan(12, 0, 0), "Prepare for lunch"),
                new Task(new TimeSpan(12, 0, 0), new TimeSpan(14, 45, 0), "Lunch"),
                new Task(new TimeSpan(14, 45, 0), new TimeSpan(15, 0, 0), "Browse the internet"),
                new Task(new TimeSpan(15, 0, 0), new TimeSpan(16, 0, 0), "Tea break"),
                new Task(new TimeSpan(16, 0, 0), new TimeSpan(17, 0, 0), "Prepare to go home")
            });
        }

        internal IOperationResult EditUser(User user)
        {
            return OperationResult.OK;
        }
    }
}